<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      div,
      p {
        border: solid 2px orangered;
      }
      div:nth-of-type(2) {
        width: 100px;
        height: 50px;
        border: solid 2px blueviolet;
      }
      span,
      a {
        background-color: goldenrod;
      }
    </style>
  </head>
  <body>
    <!-- block -->
    <div>
      parent div
      <div>child div</div>
      <span>child span</span>
    </div>
    <div>div2</div>
    <p>p</p>

    <!-- inline -->
    <span>span</span>
    <span>span2</span>
    <a href="#">a</a>
  </body>
</html>
